package com.matt.foundation.constant;

import lombok.Setter;

/**
 * *******************************
 * Created by lch.
 * form com.matt
 * on 2018/12/21
 * *******************************
 */

public class PrintConstant {

    public enum Type{
        SAME(1, "打印本周校验时间一致"),
        DIFFERENT(2, "打印本周校验时间不一致");

        @Setter
        private int code;

        @Setter
        private String value;

        Type(int code, String value){
            this.code = code;
            this.value = value;
        }

        public int codeOf(){
            return code;
        }

        public String valueOf(){
            return value;
        }

        public PrintConstant.Type get(int code){
            for (PrintConstant.Type category : values()) {
                if (category.codeOf()==code)
                    return category;
            }
            return null;
        }
    }
}
